package com.weimob.mcloud.wechatwork.customer.service.user.enums;

import lombok.Getter;

/**
 * pmc接口对接中操作来源的枚举
 *
 * @Author LeoLee
 * @Date 2022/6/22 14:18
 * @Version 1.0
 */
@Getter
public enum PmcOperationSourceEnum {
    MERCHANT(1, "商家后台"),
    OPEN_API(2, "openAPI"),
    NEW_CLOUD_APP(3, "新云APP"),
    CLIENT(4, "c端");

    private Integer code;

    private String desc;

    PmcOperationSourceEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static PmcOperationSourceEnum valueOf(Integer code) {
        for (PmcOperationSourceEnum e : values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }
}
